"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["packages_code-view-shared_hooks_use-canonical-object_ts-packages_code-view-shared_hooks_use-f-11e2e7"],{5205:(e,t,o)=>{o.d(t,{k:()=>z,o:()=>K});var a=o(74848),i=o(78314),r=o(72511),n=o(87448),s=o(49799),l=o(53552),c=o(25407),d=o(96379),u=o(96540),m=o(6665),h=o(38621),f=o(94236),p=o(21373),y=o(72579),x=o(73077),_=o(55630);let b={Box:"InfobarPopover-module__Box--qtcHk",CircleOcticon:"InfobarPopover-module__CircleOcticon--yvGLn",success:"InfobarPopover-module__success--LF_X5"};var g=o(34164);function N({children:e}){return(0,a.jsx)("div",{className:(0,g.$)("popover-container-width",b.Box),children:e})}function k({icon:e,header:t,content:o,headerRef:i}){return(0,a.jsxs)("div",{className:"d-flex p-3",children:[(0,a.jsx)("div",{className:"mr-2",children:e}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{ref:i,tabIndex:-1,className:"f5 mb-1",children:t}),(0,a.jsx)("span",{className:"fgColor-muted f6",children:o})]})]})}function j({icon:e,success:t}){return(0,a.jsx)(_.A,{size:30,icon:()=>(0,a.jsx)(e,{size:16}),className:(0,g.$)(b.CircleOcticon,t&&b.success)})}function v({children:e}){return(0,a.jsx)("div",{className:"d-flex flex-wrap flex-justify-between p-3 gap-3 border-top borderColor-muted",children:e})}try{N.displayName||(N.displayName="PopoverContainer")}catch{}try{k.displayName||(k.displayName="PopoverContent")}catch{}try{j.displayName||(j.displayName="PopoverIcon")}catch{}try{v.displayName||(v.displayName="PopoverActions")}catch{}function w(e){return`${e} ${1===e?"commit":"commits"}`}function C({comparison:e,repo:t,linkify:o=!1}){let{sendRepoClickEvent:i}=(0,m.T)(),{ahead:r,behind:n,baseBranch:s,baseBranchRange:l,currentRef:d}=e,u=(0,c.bSP)({repo:t,base:l,head:d}),h=(0,c.bSP)({repo:t,base:d,head:l}),f=()=>i("AHEAD_BEHIND_LINK",{category:"Branch Infobar",action:"Ahead Compare",label:`ref_loc:bar;is_fork:${t.isFork}`}),p=()=>i("AHEAD_BEHIND_LINK",{category:"Branch Infobar",action:"Behind Compare",label:`ref_loc:bar;is_fork:${t.isFork}`});return 0===r&&0===n?(0,a.jsxs)("span",{children:["This branch is up to date with ",(0,a.jsx)(y.A,{as:"span",children:s}),"."]}):r>0&&n>0?(0,a.jsxs)("span",{children:["This branch is"," ",(0,a.jsxs)(S,{linkify:o,href:u,onClick:f,children:[w(r)," ahead of"]}),","," ",(0,a.jsxs)(S,{linkify:o,href:h,onClick:p,children:[w(n)," behind"]})," ",(0,a.jsx)(y.A,{as:"span",children:s}),"."]}):r>0?(0,a.jsxs)("span",{children:["This branch is"," ",(0,a.jsxs)(S,{linkify:o,href:u,onClick:f,children:[w(r)," ahead of"]})," ",(0,a.jsx)(y.A,{as:"span",children:s}),"."]}):(0,a.jsxs)("span",{children:["This branch is"," ",(0,a.jsxs)(S,{linkify:o,href:h,onClick:p,children:[w(n)," behind"]})," ",(0,a.jsx)(y.A,{as:"span",children:s}),"."]})}function S({sx:e,href:t,linkify:o,children:i,...r}){return o?(0,a.jsx)(n.N_,{sx:e,href:t,...r,children:i}):(0,a.jsx)("span",{children:i})}try{C.displayName||(C.displayName="RefComparisonText")}catch{}try{S.displayName||(S.displayName="LinkOrText")}catch{}var B=o(9281);function A({comparison:e}){let t=(0,i.t)(),o=e.ahead>0,r=(0,c.bSP)({repo:t,base:e.baseBranchRange,head:e.currentRef});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{icon:(0,a.jsx)(j,{icon:h.GitPullRequestIcon}),header:o?(0,a.jsx)(C,{repo:t,comparison:{...e,behind:0}}):(0,a.jsxs)("span",{children:["This branch is not ahead of the upstream ",(0,a.jsx)(y.A,{as:"span",children:e.baseBranch}),"."]}),content:(0,a.jsx)("p",{children:o?"Open a pull request to contribute your changes upstream.":"No new commits yet. Enjoy your day!"})}),o&&(0,a.jsxs)(v,{children:[!t.isFork&&(0,a.jsx)(x.z,{className:(0,g.$)(B.A["code-view-link-button"],"flex-1"),href:r,"data-testid":"compare-button",children:"Compare"}),(0,a.jsx)(x.z,{className:(0,g.$)(B.A["code-view-link-button"],"flex-1"),href:`${r}?expand=1`,variant:"primary","data-testid":"open-pr-button",children:"Open pull request"})]})]})}try{A.displayName||(A.displayName="ContributePopoverContent")}catch{}function M({comparison:e}){let{sendRepoClickEvent:t}=(0,m.T)();return(0,a.jsxs)(f.W,{onOpenChange:e=>e&&t("CONTRIBUTE_BUTTON",{category:"Branch Infobar",action:"Open Contribute dropdown",label:"ref_loc:contribute_dropdown"}),children:[(0,a.jsx)(f.W.Anchor,{children:(0,a.jsx)(p.Q,{leadingVisual:h.GitPullRequestIcon,trailingVisual:h.TriangleDownIcon,children:"Contribute"})}),(0,a.jsx)(f.W.Overlay,{align:"end",className:"mt-2",children:(0,a.jsx)(N,{children:(0,a.jsx)(A,{comparison:e})})})]})}try{M.displayName||(M.displayName="ContributeButton")}catch{}var R=o(69726),F=o(57352);function T(e,t,o){let[a,i]=(0,u.useState)(!1);return{disabled:a,label:a?t:e,action:async()=>{i(!0),await o(),i(!1)}}}let H={category:"Branch Infobar",label:"ref_loc:fetch_upstream_dropdown"};function L({comparison:e,discard:t,update:o}){let r=(0,i.t)(),{helpUrl:n}=(0,l.sq)(),{sendRepoClickEvent:s}=(0,m.T)(),d=`${n}/github/collaborating-with-issues-and-pull-requests/syncing-a-fork`,f=(0,c.bSP)({repo:r,base:e.baseBranchRange,head:e.currentRef}),y=I(e),x=e.behind>0,_=T(`Discard ${w(e.ahead)}`,"Discarding changes...",t),b=T("Update branch","Updating...",o),N={compare:"behind"===y,discard:"behind-and-ahead"===y&&e.isTrackingBranch,update:["behind","behind-and-ahead"].includes(y)},C=Object.values(N).some(Boolean),S=(0,u.useRef)(null);return(0,u.useEffect)(()=>{let e=window.setTimeout(()=>S.current?.focus());return()=>{window.clearTimeout(e)}}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{icon:(0,a.jsx)(j,{icon:x?h.GitMergeIcon:h.CheckIcon,success:!x}),headerRef:S,header:(0,a.jsx)(O,{comparison:e}),content:(0,a.jsx)(E,{comparison:e,helpUrl:d})}),C&&(0,a.jsxs)(v,{children:[N.compare&&(0,a.jsx)(p.Q,{as:F.A,className:(0,g.$)(B.A["code-view-link-button"],"flex-1"),href:f,onClick:()=>s("SYNC_FORK.COMPARE",{...H,action:"Compare"}),"data-testid":"compare-button",children:"Compare"}),N.discard&&(0,a.jsx)(p.Q,{onClick:_.action,className:"flex-1","data-testid":"discard-button",variant:"danger",disabled:_.disabled,children:_.label}),N.update&&(0,a.jsx)(p.Q,{onClick:b.action,disabled:b.disabled,className:"flex-1",variant:"primary","data-testid":"update-branch-button",children:b.label})]})]})}function I({behind:e,ahead:t}){return 0===e&&0===t?"sync":e>0&&t>0?"behind-and-ahead":e>0?"behind":"ahead"}function O({comparison:e}){switch(I(e)){case"behind":case"behind-and-ahead":return(0,a.jsx)("span",{children:"This branch is out-of-date"});default:return(0,a.jsxs)("span",{children:["This branch is not behind the upstream ",(0,a.jsx)(y.A,{as:"span",children:e.baseBranch}),"."]})}}function E({comparison:e,helpUrl:t}){switch(I(e)){case"sync":case"ahead":return(0,a.jsx)("p",{children:"No new commits to fetch. Enjoy your day!"});case"behind":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{children:["Update branch to keep this branch up-to-date by syncing ",w(e.behind)," from the upstream repository."]}),(0,a.jsx)("p",{children:(0,a.jsx)(F.A,{href:t,target:"_blank",rel:"noopener noreferrer",children:"Learn more about syncing a fork"})})]});case"behind-and-ahead":return e.isTrackingBranch?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:"Update branch to merge the latest changes from the upstream repository into this branch."}),(0,a.jsxs)("p",{children:["Discard ",w(e.ahead)," to make this branch match the upstream repository."," ",w(e.ahead)," will be removed from this branch."]}),(0,a.jsx)("p",{children:(0,a.jsx)(F.A,{href:t,target:"_blank",rel:"noopener noreferrer",children:"Learn more about syncing a fork"})})]}):(0,a.jsx)("p",{children:"Update branch to merge the latest changes from the upstream repository into this branch."})}}try{L.displayName||(L.displayName="FetchUpstreamPopoverContent")}catch{}try{O.displayName||(O.displayName="HeaderText")}catch{}try{E.displayName||(E.displayName="ContentText")}catch{}function P({comparison:e,discard:t}){let o=(0,i.t)(),{sendRepoClickEvent:r}=(0,m.T)(),n=(0,c.w7M)({repo:o,refName:e.currentRef}),s=w(e.ahead),l=T(`Discard ${s}`,"Discarding changes...",t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k,{icon:(0,a.jsx)(j,{icon:h.AlertIcon}),header:"This branch has conflicts that must be resolved",content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{children:["Discard ",s," to make this branch match the upstream repository. ",s," will be removed from this branch."]}),(0,a.jsx)("p",{children:"You can resolve merge conflicts using the command line and a text editor."})]})}),(0,a.jsxs)(v,{children:[(0,a.jsx)(p.Q,{className:"flex-1",onClick:l.action,disabled:l.disabled,"data-testid":"discard-button",variant:"danger",children:l.label}),(0,a.jsx)(p.Q,{as:F.A,className:(0,g.$)(B.A["code-view-link-button"],"flex-1"),href:n,variant:"primary","data-testid":"open-pr-button",onClick:()=>r("SYNC_FORK.OPEN_PR",{...H,action:"Open pull request"}),children:"Open pull request"})]})]})}try{P.displayName||(P.displayName="FetchUpstreamWithConflictsPopoverContent")}catch{}function D({comparison:e}){let[t,o,r]=function({head:e,base:t}){let[o,a]=(0,u.useState)(),[r,n]=(0,u.useState)(!0),[s,l]=(0,u.useState)(),m=(0,i.t)(),h=(0,c.a3t)({repo:m,head:e,base:t});return(0,u.useEffect)(()=>{(async()=>{n(!0),a(void 0);let e=await (0,d.lS)(h);try{e.ok?a((await e.json()).state):l(e.statusText)}catch(e){l(e?.message||e?.toString())}n(!1)})()},[h]),[o,r,s]}({base:e.currentRef,head:e.baseBranchRange}),{sendRepoClickEvent:n}=(0,m.T)(),{discardChanges:s,updateBranch:h}=function(){let e=(0,i.t)(),{refInfo:{name:t}}=(0,l.eu)(),o=(0,c.X6K)({repo:e,refName:t,discard:!0}),a=(0,c.X6K)({repo:e,refName:t,discard:!1});return{updateBranch:(0,u.useCallback)(()=>(0,d.DI)(a,{method:"POST"}),[a]),discardChanges:(0,u.useCallback)(()=>(0,d.DI)(o,{method:"POST"}),[o])}}(),f=async()=>{n("SYNC_FORK.DISCARD",{...H,action:"Discard Conflicts"});let e=await s();e.ok&&e.url&&(window.location.href=e.url)},p=async()=>{n("SYNC_FORK.UPDATE",{...H,action:"Fetch and merge"});let e=await h();e.ok&&e.url&&(window.location.href=e.url)};return 0===e.behind?(0,a.jsx)(L,{update:p,discard:f,comparison:e}):o||r?(0,a.jsx)("div",{className:"p-4 d-flex flex-justify-center",children:(0,a.jsx)(R.A,{})}):"clean"===t?(0,a.jsx)(L,{update:p,discard:f,comparison:e}):(0,a.jsx)(P,{discard:f,comparison:e})}try{D.displayName||(D.displayName="FetchPopoverContainer")}catch{}function W({comparison:e}){let{sendRepoClickEvent:t}=(0,m.T)();return(0,a.jsxs)(f.W,{onOpenChange:o=>o&&t("SYNC_FORK_BUTTON",{category:"Branch Infobar",action:"Open Fetch upstream dropdown",label:"ref_loc:fetch_upstream_dropdown",ahead:e.ahead,behind:e.behind}),children:[(0,a.jsx)(f.W.Anchor,{children:(0,a.jsx)(p.Q,{leadingVisual:h.SyncIcon,trailingAction:h.TriangleDownIcon,children:"Sync fork"})}),(0,a.jsx)(f.W.Overlay,{align:"end",className:"mt-2",children:(0,a.jsx)(N,{children:(0,a.jsx)(D,{comparison:e})})})]})}try{W.displayName||(W.displayName="FetchUpstreamButton")}catch{}let q={Link:"PullRequestLink-module__Link--i17X3"};function U({repo:e,pullRequestNumber:t}){return(0,a.jsxs)(F.A,{href:(0,c.oDn)({repo:e,number:t}),className:q.Link,children:[(0,a.jsx)(h.GitPullRequestIcon,{size:16}),"#",t]})}try{U.displayName||(U.displayName="PullRequestLink")}catch{}let $={BranchInfoBarContainer:"BranchInfoBar-module__BranchInfoBarContainer--vaFVP",Box:"BranchInfoBar-module__Box--NhDLA"};function z({sx:e}){let t,[o,r]=function(){let[e,t]=(0,u.useState)(),[o,a]=(0,u.useState)(),{refInfo:r,path:n}=(0,l.eu)(),s=(0,i.t)(),m=(0,c.IO9)({repo:s,action:"branch-infobar",commitish:r.name,path:n});return(0,u.useEffect)(()=>{(async()=>{t(void 0);let e=await (0,d.lS)(m);try{e.ok?t(await e.json()):a(422===e.status?"timeout":e.statusText)}catch(e){a(e?.message||e?.toString())}})()},[m]),[e,o]}(),n=(0,i.t)();return t="timeout"===r?(0,a.jsx)(a.Fragment,{children:"Sorry, getting ahead/behind information for this branch is taking too long."}):o?o.refComparison?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{linkify:!0,repo:n,comparison:o.refComparison}),(0,a.jsx)("div",{className:"d-flex gap-2",children:o.pullRequestNumber?(0,a.jsx)(U,{repo:n,pullRequestNumber:o.pullRequestNumber}):(0,a.jsxs)(a.Fragment,{children:[n.currentUserCanPush&&(0,a.jsx)(M,{comparison:o.refComparison}),n.isFork&&n.currentUserCanPush&&(0,a.jsx)(W,{comparison:o.refComparison})]})})]}):(0,a.jsx)(a.Fragment,{children:"Cannot retrieve ahead/behind information for this branch."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.r,{width:"40%"}),(0,a.jsx)(s.r,{width:"30%"})]}),(0,a.jsx)(V,{sx:e,className:$.BranchInfoBarContainer,children:t})}function V({children:e,sx:t,className:o}){return(0,a.jsx)(n.az,{"data-testid":"branch-info-bar","aria-live":"polite",sx:t,className:(0,g.$)($.Box,o),children:e})}function K(){return(0,a.jsx)(r.A,{variant:"warning",className:"my-3",children:(0,a.jsx)("span",{children:"Cannot retrieve comparison with upstream repository."})})}try{z.displayName||(z.displayName="BranchInfoBar")}catch{}try{V.displayName||(V.displayName="BranchInfoBarContainer")}catch{}try{K.displayName||(K.displayName="BranchInfoBarErrorBanner")}catch{}},6426:(e,t,o)=>{o.d(t,{S:()=>A,D:()=>B});var a=o(74848),i=o(49799),r=o(53552),n=o(6665),s=o(61200),l=o(78314),c=o(25407),d=o(66108),u=o(73017),m=o(20263),h=o(41462),f=o(91547),p=o(38621),y=o(62935),x=o(57352),_=o(73077),b=o(26108),g=o(96540),N=o(99896);function k({status:e,oid:t}){let o=(0,l.t)(),[i,r]=(0,N.ym)(t,o);return e?(0,a.jsx)(N.B6,{statusRollup:e,combinedStatus:i,onWillOpenPopup:r,size:"small"}):null}try{k.displayName||(k.displayName="ReposChecksStatusBadge")}catch{}var j=o(9281);let v={Box:"LatestCommit-module__Box--Fimpo",Box_1:"LatestCommit-module__Box_1--aQ5OG",Box_2:"LatestCommit-module__Box_2--JDY37",IconButton:"LatestCommit-module__IconButton--Zxaob",Box_3:"LatestCommit-module__Box_3--Egpxh",VerifiedHTMLText:"LatestCommit-module__VerifiedHTMLText--_m6PQ",VerifiedHTMLText_1:"LatestCommit-module__VerifiedHTMLText_1--Prx0J"};var w=o(34164),C=o(10095),S=o(55255);function B({commitCount:e}){return(0,a.jsx)("div",{className:"d-flex flex-column border rounded-2 mb-3 pl-1",children:(0,a.jsx)(A,{commitCount:e})})}function A({commitCount:e}){let t=(0,l.t)(),{refInfo:o,path:n}=(0,r.eu)(),[s,c,d]=(0,f.E)(t.ownerLogin,t.name,o.name,n),[u,m]=(0,g.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:v.Box,children:[(0,a.jsx)(h.W,{as:"h2",text:"Latest commit"}),d?(0,a.jsx)(M,{}):c?(0,a.jsx)(i.r,{width:120,"data-testid":"loading"}):s?(0,a.jsx)(R,{commit:s,detailsOpen:u,setDetailsOpen:m,repo:t}):null,(0,a.jsxs)("div",{className:"d-flex flex-shrink-0 gap-2",children:[(0,a.jsx)(F,{commit:s,repo:t}),(0,a.jsx)(T,{commit:s,commitCount:e,detailsOpen:u,setDetailsOpen:m})]})]}),u&&s&&(0,a.jsx)("div",{className:s.bodyMessageHtml?"d-flex":"d-flex d-sm-none",children:(0,a.jsx)(O,{commit:s,repo:t})})]})}function M(){return(0,a.jsxs)("span",{className:"fgColor-attention","data-testid":"latest-commit-error-message",children:[(0,a.jsx)(C.A,{icon:p.AlertFillIcon}),"\xa0Cannot retrieve latest commit at this time."]})}function R({commit:e,detailsOpen:t,setDetailsOpen:o,repo:i}){let r=`data-hovercard-url=${(0,c.fQd)({owner:i.ownerLogin,repo:i.name,commitish:e.oid})} `,n=function(e,t){let o="";if(e){for(let a of e.split("0?(0,a.jsx)(s.jF,{authors:e.authors,repo:i,includeVerbs:!1,committer:e.committer,committerAttribution:e.committerAttribution}):(0,a.jsx)(s.h1,{author:e.author,repo:i}),(0,a.jsxs)("div",{className:(0,w.$)("d-none d-sm-flex",v.Box_2),children:[(0,a.jsx)("div",{className:"Truncate flex-items-center f5",children:e.shortMessageHtmlLink&&(0,a.jsx)(m.BC,{className:"Truncate-text","data-testid":"latest-commit-html",html:n})}),e.bodyMessageHtml&&(0,a.jsx)(I,{detailsOpen:t,setDetailsOpen:o}),(0,a.jsx)(k,{oid:e.oid,status:e.status})]}),Number.isNaN(Date.parse(e.date))?null:(0,a.jsx)("span",{className:"d-flex d-sm-none fgColor-muted f6",children:(0,a.jsx)(y.A,{datetime:e.date,tense:"past"})})]})}function F({commit:e,repo:t}){let o=e?.oid.slice(0,7);return(0,a.jsx)("div",{"data-testid":"latest-commit-details",className:"d-none d-sm-flex flex-items-center",children:e&&(0,a.jsxs)("span",{className:"d-flex flex-nowrap fgColor-muted f6",children:[(0,a.jsx)(x.A,{as:d.N,to:e.url,className:"Link--secondary","aria-label":`Commit ${o}`,"data-hovercard-url":(0,c.fQd)({owner:t.ownerLogin,repo:t.name,commitish:e.oid}),children:o}),"\xa0\xb7\xa0",Number.isNaN(Date.parse(e.date))?null:(0,a.jsx)(y.A,{datetime:e.date,tense:"past"})]})})}function T({commit:e,commitCount:t,detailsOpen:o,setDetailsOpen:i}){return(0,a.jsxs)("div",{className:"d-flex gap-2",children:[(0,a.jsx)(h.W,{as:"h2",text:"History"}),(0,a.jsx)(L,{className:"d-none d-lg-flex",leadingVisual:p.HistoryIcon,children:(0,a.jsx)("span",{className:"fgColor-default",children:H(t)})}),(0,a.jsx)("div",{className:"d-sm-none",children:(e?.shortMessageHtmlLink||e?.bodyMessageHtml)&&(0,a.jsx)(I,{detailsOpen:o,setDetailsOpen:i})}),(0,a.jsx)("div",{className:"d-flex d-lg-none",children:(0,a.jsx)(S.A,{text:H(t),id:"history-icon-button-tooltip",children:(0,a.jsx)(L,{leadingVisual:p.HistoryIcon,"aria-describedby":"history-icon-button-tooltip","aria-label":"View commit history for this file."})})})]})}function H(e){return e?"1"===e?"1 Commit":`${e} Commits`:"History"}function L({children:e,className:t,leadingVisual:o,...i}){let{sendRepoClickEvent:s}=(0,n.T)(),{refInfo:d,path:u}=(0,r.eu)(),m=(0,l.t)();return(0,a.jsx)(_.z,{"aria-describedby":i["aria-describedby"],"aria-label":i["aria-label"],className:(0,w.$)(t,j.A["code-view-link-button"],"flex-items-center fgColor-default"),onClick:()=>s("HISTORY_BUTTON"),href:(0,c.GpY)({owner:m.ownerLogin,repo:m.name,ref:d.name,path:u}),variant:"invisible",size:"small",leadingVisual:o,children:e})}function I({detailsOpen:e,setDetailsOpen:t}){return(0,a.jsx)(b.K,{"aria-label":"Open commit details",icon:p.EllipsisIcon,onClick:()=>t(!e),variant:"invisible","aria-pressed":e,"aria-expanded":e,"data-testid":"latest-commit-details-toggle",size:"small",className:v.IconButton})}function O({commit:e,repo:t}){let o=e?.oid.slice(0,7);return(0,a.jsxs)("div",{className:"bgColor-muted border-top rounded-bottom-2 px-3 py-2 flex-1",children:[(0,a.jsxs)("div",{className:"d-flex d-sm-none flex-column",children:[(0,a.jsxs)("div",{className:v.Box_3,children:[e.shortMessageHtmlLink&&(0,a.jsx)(u.JR,{className:(0,w.$)("Truncate-text",v.VerifiedHTMLText),"data-testid":"latest-commit-html",html:e.shortMessageHtmlLink}),(0,a.jsx)(k,{oid:e.oid,status:e.status})]}),(0,a.jsx)(x.A,{as:d.N,to:e.url,className:"Link--secondary","aria-label":`Commit ${o}`,"data-hovercard-url":(0,c.fQd)({owner:t.ownerLogin,repo:t.name,commitish:e.oid}),children:o}),e.bodyMessageHtml&&(0,a.jsx)("br",{})]}),e.bodyMessageHtml&&(0,a.jsx)("div",{className:"mt-2 mt-sm-0 fgColor-muted",children:(0,a.jsx)(u.JR,{className:(0,w.$)("Truncate-text",v.VerifiedHTMLText_1),"data-testid":"latest-commit-html",html:e.bodyMessageHtml})})]})}try{B.displayName||(B.displayName="LatestCommitSingleLine")}catch{}try{A.displayName||(A.displayName="LatestCommitContent")}catch{}try{M.displayName||(M.displayName="CommitErrorMessage")}catch{}try{R.displayName||(R.displayName="CommitSummary")}catch{}try{F.displayName||(F.displayName="LastCommitTimestamp")}catch{}try{T.displayName||(T.displayName="HistoryLink")}catch{}try{L.displayName||(L.displayName="HistoryLinkButton")}catch{}try{I.displayName||(I.displayName="CommitDetailsButton")}catch{}try{O.displayName||(O.displayName="CommitDetails")}catch{}},6665:(e,t,o)=>{o.d(t,{T:()=>d});var a=o(78314),i=o(25407),r=o(91747),n=o(30459),s=o(96379),l=o(96540),c=o(35898);function d(){let{sendAnalyticsEvent:e}=(0,n.s)(),t=function(){let e=function(){let e=(0,a.t)(),t=(0,c.i)();return(0,l.useMemo)(()=>({react_app:"code-view",repository_id:e.id,repository_nwo:`${e.ownerLogin}/${e.name}`,repository_public:e.public,repository_is_fork:e.isFork,actor_id:t?.id,actor_login:t?.login}),[e,t])}(),t=(0,a.t)(),o=(0,i.yH8)(i.tTz,{owner:t.ownerLogin,repo:t.name});return(0,l.useCallback)((t,a,i)=>{let r={target:t,interaction:a,context:i,...e,...{url:window.location.href,user_agent:window.navigator.userAgent,browser_width:window.innerWidth,browser_languages:window.navigator.languages.join(",")}};(0,s.lS)(o,{method:"POST",body:r})},[e,o])}(),o=(0,r.u)("code_nav_ui_events");return{sendRepoClickEvent:(0,l.useCallback)((a,i={})=>{e("repository.click",a,i),o&&t(a,"click",i)},[e,t,o]),sendRepoKeyDownEvent:(0,l.useCallback)((a,i={})=>{e("repository.keydown",a,i),o&&t(a,"keydown",i)},[e,t,o]),sendStats:(0,l.useCallback)((a,i={})=>{e(a,"",i),o&&t(a,"stats",i)},[e,t,o]),sendMarketplaceActionEvent:(0,l.useCallback)((t,o={})=>{e("marketplace.action.click",t,o)},[e])}}},9281:(e,t,o)=>{o.d(t,{A:()=>a});let a={"code-view-link-button":"LinkButton-module__code-view-link-button--thtqc"}},10677:(e,t,o)=>{o.d(t,{X:()=>s,d:()=>n});var a=o(74848),i=o(96540);let r=i.createContext({});function n(){return i.useContext(r)}function s({payload:e,children:t}){return(0,a.jsx)(r.Provider,{value:e,children:t})}try{r.displayName||(r.displayName="TreeContext")}catch{}try{s.displayName||(s.displayName="CurrentTreeProvider")}catch{}},13364:(e,t,o)=>{o.d(t,{P:()=>l});var a=o(25407),i=o(64677),r=o(76648),n=o(96540),s=o(17038);function l(e){let t=(0,r.B)(),o=e||t,l=(0,n.useRef)(o),c=(0,i.q)();if(o)l.current=o;else{let e=(0,a.n7E)(location.pathname,l.current.refInfo.name,l.current.path);o=(0,s.Bl)(l.current,c,e)}return o}},17038:(e,t,o)=>{o.d(t,{Bl:()=>r,aO:()=>i});var a=o(41617);function i(e){return(0,a.Hf)(e)?{...e.fileTree,[e.path]:{items:e.tree.items,totalCount:e.tree.totalCount}}:e.fileTree}function r(e,t,o){return{path:o,repo:e.repo,refInfo:e.refInfo,currentUser:e.currentUser,fileTree:i(e),fileTreeProcessingTime:e.fileTreeProcessingTime,foldersToFetch:e.foldersToFetch,allShortcutsEnabled:e.allShortcutsEnabled,treeExpanded:e.treeExpanded,symbolsExpanded:e.symbolsExpanded,codeLineWrapEnabled:e.codeLineWrapEnabled,isMarketplaceEnabled:e.isMarketplaceEnabled,error:t||void 0}}},19189:(e,t,o)=>{o.d(t,{Z:()=>l});var a=o(53552),i=o(78314),r=o(25407),n=o(54571),s=o(96540);function l(){let e=(0,i.t)(),{path:t,action:o,refInfo:l}=(0,a.eu)(),[c]=(0,n.I)(()=>!1,!0,[]);function d(e){return e?`?${e}`:""}function u(e){return c?"":void 0===e?window.location.hash:e?`#${e}`:""}return{getItemUrl:s.useCallback(t=>(0,r.IO9)({repo:e,commitish:l.name,action:"directory"===t.contentType?"tree":"blob",path:t.path}),[e.ownerLogin,e.name,l.name]),getUrl(a={}){let i=(0,r.IO9)({repo:e,commitish:a.commitish||l.name,action:a.action||o,path:a.path||t})+function({params:e,hash:t}){return d(e)+u(t)}(a);return a.absolute?new URL(i,window.location.origin).href:i},createPermalink(a={}){let i=(0,r.IO9)({repo:e,commitish:l.currentOid,action:a.action||o,path:a.path||t})+function({params:e,hash:t}){return d(e)+u(t)}(a);return a.absolute?new URL(i,window.location.origin).href:i},isCurrentPagePermalink:()=>!c&&l.name===l.currentOid&&window.location.pathname.includes(l.currentOid)}}},19357:(e,t,o)=>{o.d(t,{e:()=>l,i:()=>s});var a=o(74848),i=o(71315),r=o(96540);let n=r.createContext({focusHint:null,setFocusHint:()=>void 0});function s({children:e}){let t={key:i.fV.pathname+i.fV.search},o=(0,r.useRef)(t.key),s=(0,r.useRef)(t.key),l=(0,r.useRef)({hint:null,location:null}),c=(0,r.useCallback)((e,o)=>{l.current={hint:e,context:o,location:t.key}},[t.key]);s.current!==t.key&&(o.current=s.current,s.current=t.key);let d=l.current.location===o.current,u=d?l.current.hint:null,m=d?l.current.context:null,h=(0,r.useMemo)(()=>({focusHint:u,context:m,setFocusHint:c}),[u,m,c]);return(0,a.jsx)(n.Provider,{value:h,children:e})}function l(){return(0,r.useContext)(n)}try{n.displayName||(n.displayName="FocusHintContext")}catch{}try{s.displayName||(s.displayName="FocusHintContextProvider")}catch{}},20263:(e,t,o)=>{o.d(t,{BC:()=>l,JU:()=>d,Pk:()=>s});var a=o(74848),i=o(87448),r=o(99418),n=o(96540);let s=u(i.az),l=u(i.EY),c=(0,n.forwardRef)((e,t)=>(0,a.jsx)("div",{ref:t,...e}));c.displayName="Div";let d=u(c);function u(e){let t=(0,n.forwardRef)((t,o)=>{let{sanitizedHTML:i,props:n}=function(e){let{html:t,domPurifyConfig:o,...a}=e,i={...o,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1};return{sanitizedHTML:r.default.sanitize(t,i),props:a}}(t);return(0,a.jsx)(e,{ref:o,...n,dangerouslySetInnerHTML:{__html:i}})});return t.displayName=`UnsafeHTML${e.displayName||e.name}`,t}try{d.displayName||(d.displayName="UnsafeHTMLDiv")}catch{}},26619:(e,t,o)=>{o.d(t,{Xl:()=>l,lG:()=>d,x7:()=>s,yY:()=>c});var a=o(74848),i=o(96540),r=o(88934);let n=(0,i.createContext)({banners:[],addBanner:()=>void 0,addQueuedBanner:()=>void 0});function s(){return(0,i.useContext)(n).banners}function l(){return(0,i.useContext)(n).addBanner}function c(){return(0,i.useContext)(n).addQueuedBanner}function d({children:e}){let t=(0,r.zy)(),[o,s]=(0,i.useState)([]),[l,c]=(0,i.useState)([]),d=(0,i.useCallback)(e=>s(t=>[...t,e]),[]),u=(0,i.useCallback)(e=>c(t=>[...t,e]),[]),m=(0,i.useMemo)(()=>({banners:o,addBanner:d,addQueuedBanner:u}),[d,u,o]);return(0,i.useEffect)(()=>{s(l),c([])},[t.key]),(0,a.jsx)(n.Provider,{value:m,children:e})}try{n.displayName||(n.displayName="CodeViewBannersContext")}catch{}try{d.displayName||(d.displayName="CodeViewBannersProvider")}catch{}},30459:(e,t,o)=>{o.d(t,{S:()=>l,s:()=>s});var a=o(21728),i=o(96540),r=o(53419),n=o(49936);function s(){let e,t,o=(0,a.c)(6),s=(0,i.useContext)(n.I);if(!s)throw Error("useAnalytics must be used within an AnalyticsContext");let{appName:l,category:c,metadata:d}=s;o[0]!==l||o[1]!==c||o[2]!==d?(e=(e,t,o)=>{let a={react:!0,app_name:l,category:c,...d};(0,r.BI)(e,{...a,...void 0===o?{}:o,target:t})},o[0]=l,o[1]=c,o[2]=d,o[3]=e):e=o[3];let u=e;return o[4]!==u?(t={sendAnalyticsEvent:u},o[4]=u,o[5]=t):t=o[5],t}function l(){let e,t,o=(0,a.c)(4),{sendAnalyticsEvent:i}=s();o[0]!==i?(e=e=>{i("analytics.click",void 0,void 0===e?{}:e)},o[0]=i,o[1]=e):e=o[1];let r=e;return o[2]!==r?(t={sendClickAnalyticsEvent:r},o[2]=r,o[3]=t):t=o[3],t}},31078:(e,t,o)=>{o.d(t,{Ck:()=>s,JS:()=>n});var a=o(74848),i=o(96540);let r=(0,i.createContext)({query:"",setQuery:()=>void 0});function n(){return(0,i.useContext)(r)}function s({children:e}){let[t,o]=(0,i.useState)(""),n=(0,i.useMemo)(()=>({query:t,setQuery:o}),[o,t]);return(0,a.jsx)(r.Provider,{value:n,children:e})}try{r.displayName||(r.displayName="FileQueryContext")}catch{}try{s.displayName||(s.displayName="FileQueryProvider")}catch{}},34424:(e,t,o)=>{o.d(t,{e:()=>m});var a=o(74848),i=o(53552),r=o(78314),n=o(25407),s=o(38621),l=o(57352),c=o(10095),d=o(59775);let u={SharedMarkdownContent:"DirectoryRichtextContent-module__SharedMarkdownContent--BTKsc"};function m({errorMessage:e,onAnchorClick:t,path:o,richText:m,stickyHeaderHeight:h,timedOut:f}){let p=(0,r.t)(),{refInfo:y}=(0,i.eu)();return e?(0,a.jsxs)("div",{className:"py-6 px-3 text-center",children:[f&&(0,a.jsx)(c.A,{icon:s.HourglassIcon,size:32}),(0,a.jsx)("div",{"data-testid":"directory-richtext-error-message",children:e}),f&&(0,a.jsxs)("div",{children:["But you can view the"," ",(0,a.jsx)(l.A,{inline:!0,href:(0,n.IO9)({repo:p,commitish:y.name,action:"raw",path:o}),"data-testid":"directory-richtext-timeout-raw-link",children:"raw file"}),"."]})]}):m?(0,a.jsx)(d.s,{onAnchorClick:t,richText:m,stickyHeaderHeight:h,className:u.SharedMarkdownContent}):null}try{m.displayName||(m.displayName="DirectoryRichtextContent")}catch{}},37272:(e,t,o)=>{o.d(t,{E:()=>r});var a=o(74848),i=o(64375);function r({children:e}){return(0,i.P)()?(0,a.jsx)(a.Fragment,{children:e}):null}try{r.displayName||(r.displayName="AllShortcutsEnabled")}catch{}},39111:(e,t,o)=>{o.d(t,{X:()=>i});var a=o(54571);function i(e){let t=e.join(","),[o]=(0,a.I)(()=>{let e=/Windows/.test(navigator.userAgent)?"windows":/Macintosh/.test(navigator.userAgent)?"mac":null;return!!e&&t.includes(e)},!1,[t]);return o}},41461:(e,t,o)=>{o.d(t,{E:()=>a});let a={"&:hover:not([disabled])":{textDecoration:"none"},"&:focus:not([disabled])":{textDecoration:"none"},"&:active:not([disabled])":{textDecoration:"none"}}},41462:(e,t,o)=>{o.d(t,{W:()=>n});var a=o(74848),i=o(81960);let r={userSelectNone:"ScreenReaderHeading-module__userSelectNone--vlUbc"};function n({as:e,text:t,...o}){return(0,a.jsx)(i.A,{as:e,className:`sr-only ${r.userSelectNone}`,"data-testid":"screen-reader-heading",...o,children:t})}try{n.displayName||(n.displayName="ScreenReaderHeading")}catch{}},41617:(e,t,o)=>{function a(e){return"blob"in e}function i(e){return a(e)&&"blame"in e}function r(e){return"deleteInfo"in e&&"webCommitInfo"in e}function n(e){return"editInfo"in e&&"webCommitInfo"in e}o.d(t,{fP:()=>s,KR:()=>i,mM:()=>a,iS:()=>r,di:()=>n,Hf:()=>l});let s={README:"readme",CODE_OF_CONDUCT:"code_of_conduct",CONTRIBUTING:"contributing",LICENSE:"license",SECURITY:"security"};function l(e){return"tree"in e}},49799:(e,t,o)=>{o.d(t,{r:()=>i});var a=o(74848);function i({width:e,...t}){return(0,a.jsx)("div",{style:{width:e},className:"Skeleton Skeleton--text",...t,children:"\xa0"})}try{i.displayName||(i.displayName="SkeletonText")}catch{}},50731:(e,t,o)=>{o.d(t,{p:()=>i});var a=o(96540);function i(e){let t=(0,a.useRef)([]);for(let o of t.current)if(e===o||function e(t,o){if(t===o)return!0;if("object"!=typeof t||typeof t!=typeof o||!t||!o)return!1;if(Array.isArray(t)){if(!Array.isArray(o)||t.length!==o.length)return!1;for(let a=0;a5&&t.current.pop(),e}},53419:(e,t,o)=>{let a;o.d(t,{BI:()=>f,Ti:()=>p,lA:()=>m,sX:()=>h});var i=o(70837),r=o(18679),n=o(82075),s=o(11083);let{getItem:l}=(0,n.A)("localStorage"),c="dimension_",d=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","scid"];try{let e=(0,i.O)("octolytics");delete e.baseContext,a=new r.s(e)}catch{}function u(e){let t=(0,i.O)("octolytics").baseContext||{};if(t)for(let[e,o]of(delete t.app_id,delete t.event_url,delete t.host,Object.entries(t)))e.startsWith(c)&&(t[e.replace(c,"")]=o,delete t[e]);let o=document.querySelector("meta[name=visitor-payload]");for(let[e,a]of(o&&Object.assign(t,JSON.parse(atob(o.content))),new URLSearchParams(window.location.search)))d.includes(e.toLowerCase())&&(t[e]=a);return t.staff=(0,s.X)().toString(),Object.assign(t,e)}function m(e){a?.sendPageView(u(e))}function h(){return document.head?.querySelector('meta[name="current-catalog-service"]')?.content}function f(e,t={}){let o=h(),i=o?{service:o}:{};for(let[e,o]of Object.entries(t))null!=o&&(i[e]=`${o}`);a&&(u(i),a.sendEvent(e||"unknown",u(i)))}function p(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]))}},53552:(e,t,o)=>{o.d(t,{eu:()=>l,qV:()=>s,sq:()=>c});var a=o(74848),i=o(79634),r=o(96540);let n=r.createContext({});function s({children:e,...t}){return(0,a.jsx)(n.Provider,{value:t,children:e})}function l(){return r.useContext(n)}function c(){return(0,i.X)()}try{n.displayName||(n.displayName="FilesPageInfoContext")}catch{}try{s.displayName||(s.displayName="FilesPageInfoProvider")}catch{}},54571:(e,t,o)=>{o.d(t,{I:()=>n});var a=o(96540),i=o(88431),r=o(76629);function n(e,t,o=[]){let s=(0,a.useCallback)(e,o),l=(0,r.BP)(),c=(0,a.useRef)(l===r.O8.ClientRender),[d,u]=(0,a.useState)(()=>l===r.O8.ClientRender?s():t),m=(0,a.useCallback)(()=>{u(s)},[s]);return(0,i.N)(()=>{c.current||u(s),c.current=!1},[s,...o]),[d,m]}},55630:(e,t,o)=>{o.d(t,{A:()=>n});var a=o(74848),i=o(21728);function r(e){let t,o,r,n,s,l,c,d,u,m,h,f,p=(0,i.c)(26);if(p[0]!==e){let{size:a,as:i,icon:d,bg:u,"aria-label":m,style:h,className:f,...y}=e;c=a,t=d,r=u,o=m,l=h,n=f,s=y,p[0]=e,p[1]=t,p[2]=o,p[3]=r,p[4]=n,p[5]=s,p[6]=l,p[7]=c}else t=p[1],o=p[2],r=p[3],n=p[4],s=p[5],l=p[6],c=p[7];let y=void 0===c?32:c;return p[8]!==r||p[9]!==y?(d={backgroundColor:r,overflow:"hidden",borderWidth:0,borderRadius:"50%",borderStyle:"solid",borderColor:"var(--borderColor-default)",width:y,height:y},p[8]=r,p[9]=y,p[10]=d):d=p[10],p[11]!==y||p[12]!==l?(u={display:"flex",width:y,height:y,alignItems:"center",justifyContent:"center",...l},p[11]=y,p[12]=l,p[13]=u):u=p[13],p[14]!==t||p[15]!==o||p[16]!==y?(m=(0,a.jsx)(t,{size:y,"aria-label":o}),p[14]=t,p[15]=o,p[16]=y,p[17]=m):m=p[17],p[18]!==n||p[19]!==s||p[20]!==u||p[21]!==m?(h=(0,a.jsx)("div",{style:u,className:n,...s,children:m}),p[18]=n,p[19]=s,p[20]=u,p[21]=m,p[22]=h):h=p[22],p[23]!==d||p[24]!==h?(f=(0,a.jsx)("div",{style:d,children:h}),p[23]=d,p[24]=h,p[25]=f):f=p[25],f}let n=r;try{r.displayName||(r.displayName="CircleOcticon")}catch{}},59775:(e,t,o)=>{o.d(t,{s:()=>u,e:()=>m});var a=o(74848),i=o(78314),r=o(41245),n=o(73017),s=o(88431),l=o(96459),c=o(96540),d=o(88934);let u=(0,c.forwardRef)(function({onAnchorClick:e,richText:t,stickyHeaderHeight:o,sx:u,suppressHydrationWarning:h,className:f},p){let{hash:y}=(0,d.zy)(),x=(0,i.t)(),_=(0,l.Z)(),b=(0,c.useRef)(null);return(0,c.useImperativeHandle)(p,()=>b.current),(0,c.useEffect)(()=>{let e=()=>{m(window.location.hash,o)};return window.addEventListener("load",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("load",e),window.removeEventListener("hashchange",e)}},[]),(0,s.N)(()=>{b?.current&&m(window.location.hash,o)},[y]),(0,a.jsx)(n.vb,{ref:b,className:`js-snippet-clipboard-copy-unpositioned ${f}`,html:t,sx:u,suppressHydrationWarning:h,"data-hpc":!0,onClick:t=>{let a=t.metaKey||t.ctrlKey,i=t.target.closest("a");if(i&&i.href){if(!a){let e=i.href,a=new URL(e,window.location.origin);(0,r.A)(window.location.href,e)?(m(a.hash,o),window.location.hash===a.hash&&t.preventDefault()):e.startsWith(`${window.location.origin}/${x.ownerLogin}/${x.name}/`)&&(_(a.pathname+a.search+a.hash),t.preventDefault())}e?.(t)}}})});function m(e,t=125){var o;if(!e)return;let a=(function(e){try{return decodeURIComponent(e.slice(1))}catch{return""}})(e).toLowerCase(),i=a.startsWith("user-content-")?a:`user-content-${a}`,r=(o=document,""===i?null:o.getElementById(i)||o.getElementsByName(i)[0]||null);r&&document&&document.defaultView&&setTimeout(()=>{window.requestAnimationFrame(()=>{let e=r.getBoundingClientRect().top-document.body.getBoundingClientRect().top-t;window.scrollTo({top:e});let o=r.closest("h1,h2,h3,h4,h5,h6,li,span");o&&(o.focus(),o.setAttribute("data-react-autofocus","true"))})},1)}try{u.displayName||(u.displayName="SharedMarkdownContent")}catch{}try{u.displayName||(u.displayName="SharedMarkdownContent")}catch{}},60971:(e,t,o)=>{o.d(t,{L:()=>_});var a=o(74848),i=o(78314),r=o(25407),n=o(66108),s=o(41462),l=o(38621),c=o(56149),d=o(94236),u=o(21373),m=o(5524),h=o(96540),f=o(53552),p=o(6665);let y={ActionMenu_Overlay:"AddFileDropdownButton-module__ActionMenu_Overlay--WxIUs"},x="add-file-dropdown-portal-root";function _({useDynamicSizing:e}){let{refInfo:t,path:o}=(0,f.eu)(),_=(0,i.t)(),{sendRepoClickEvent:b}=(0,p.T)(),g=(0,h.useRef)(null);return((0,h.useEffect)(()=>{g.current&&(0,c.cw)(g.current,x)},[]),t.canEdit)?(0,a.jsxs)("div",{ref:g,children:[(0,a.jsx)(s.W,{as:"h2",text:"Add file"}),(0,a.jsxs)(d.W,{children:[(0,a.jsx)(d.W.Anchor,{children:(0,a.jsxs)(u.Q,{"aria-label":"Add file",children:[(0,a.jsxs)("span",{className:e?"react-directory-add-file-button":void 0,children:["Add file",(0,a.jsx)(l.TriangleDownIcon,{})]}),e&&(0,a.jsx)(l.PlusIcon,{className:"react-directory-add-file-icon"})]})}),(0,a.jsx)(d.W.Overlay,{className:y.ActionMenu_Overlay,portalContainerName:x,children:(0,a.jsxs)(m.l,{children:[(0,a.jsxs)(m.l.LinkItem,{as:n.N,onClick:()=>b("NEW_FILE_BUTTON"),to:(0,r.IO9)({repo:_,path:o,commitish:t.name,action:"new"}),children:[(0,a.jsx)(m.l.LeadingVisual,{children:(0,a.jsx)(l.PlusIcon,{})}),"Create new file"]}),(0,a.jsxs)(m.l.LinkItem,{onClick:()=>b("UPLOAD_FILES_BUTTON"),href:(0,r.IO9)({repo:_,path:o,commitish:t.name,action:"upload"}),children:[(0,a.jsx)(m.l.LeadingVisual,{children:(0,a.jsx)(l.UploadIcon,{})}),"Upload files"]})]})})]})]}):null}try{_.displayName||(_.displayName="AddFileDropdownButton")}catch{}},61282:(e,t,o)=>{o.d(t,{V:()=>h});var a=o(74848),i=o(21728),r=o(96540),n=o(38621),s=o(26108),l=o(21373),c=o(31604),d=o(69726),u=o(54571);let m=(0,r.lazy)(()=>Promise.all([o.e("primer-react"),o.e("react-lib"),o.e("react-core"),o.e("vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-2f4e04"),o.e("vendors-node_modules_tanstack_query-core_build_modern_mutation_js-node_modules_tanstack_query-9bf7e4"),o.e("vendors-node_modules_dompurify_dist_purify_es_mjs"),o.e("vendors-node_modules_tanstack_query-core_build_modern_queryObserver_js-node_modules_tanstack_-defd52"),o.e("vendors-node_modules_date-fns_format_mjs"),o.e("vendors-node_modules_date-fns_addWeeks_mjs-node_modules_date-fns_addYears_mjs-node_modules_da-827f4f"),o.e("vendors-node_modules_github_relative-time-element_dist_index_js"),o.e("vendors-node_modules_github_hotkey_dist_index_js-node_modules_date-fns_getDaysInMonth_mjs-nod-70c11b"),o.e("vendors-node_modules_dnd-kit_modifiers_dist_modifiers_esm_js-node_modules_dnd-kit_sortable_di-5ada6e"),o.e("vendors-node_modules_braintree_browser-detection_dist_browser-detection_js-node_modules_githu-bb80ec"),o.e("vendors-node_modules_tanstack_react-virtual_dist_esm_index_js"),o.e("vendors-node_modules_tanstack_react-query_build_modern_useQuery_js-node_modules_diff_lib_index_mjs"),o.e("vendors-node_modules_react-relay_index_js"),o.e("vendors-node_modules_comma-separated-tokens_index_js-node_modules_mdast-util-from-markdown_li-6db53e"),o.e("vendors-node_modules_hastscript_lib_index_js-node_modules_mdast-util-gfm_lib_index_js-node_mo-2895d2"),o.e("vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_accname_dist_access-ce77c7"),o.e("vendors-node_modules_remark-parse_lib_index_js-node_modules_unified_lib_index_js"),o.e("vendors-node_modules_lowlight_lib_all_js-node_modules_react-markdown_lib_index_js-node_module-5ac2ea"),o.e("vendors-node_modules_emoji-regex_index_js-node_modules_fzy_js_index_js-node_modules_primer_st-8d576a"),o.e("packages_paths_index_ts"),o.e("packages_ui-commands_ui-commands_ts"),o.e("packages_date-picker_components_DatePicker_tsx"),o.e("packages_drag-and-drop_drag-and-drop_ts-packages_hydro-analytics_hydro-analytics_ts"),o.e("packages_list-view_src_hooks_use-next-header-tag_ts-packages_list-view_src_ListItem_ListItem_-055669"),o.e("packages_ref-selector_RefSelector_tsx"),o.e("packages_copilot-chat_utils_copilot-local-storage_ts"),o.e("packages_copilot-chat_components_tracing_TraceProvider_tsx"),o.e("packages_copilot-chat_utils_CopilotChatContext_tsx-packages_safe-html_VerifiedHTML_tsx"),o.e("packages_relay-environment_relay-environment_ts"),o.e("packages_item-picker_components_RepositoryPicker_tsx"),o.e("packages_copilot-chat_utils_language-info_ts-packages_copy-to-clipboard_CopyToClipboardButton_tsx"),o.e("packages_history_history_ts-packages_soft-nav_state_ts-packages_agent-sessions_components_new-9fc8d0"),o.e("packages_copilot-markdown_MarkdownRenderer_tsx"),o.e("packages_code-view-shared_hooks_use-repos-analytics_ts-packages_code-view-shared_hooks_use-tr-fbe81a"),o.e("packages_copilot-chat_components_ModelPicker_tsx-packages_copilot-byok_providers_assets_anthr-76f86b"),o.e("packages_agent-sessions_hooks_use-sso-change-detection_ts-packages_agent-sessions_utils_gener-7b2f56"),o.e("packages_failbot_failbot_ts-packages_pull-request-page-data-tooling_utils_fetch-error-handlin-53bc4a"),o.e("packages_use-analytics_use-analytics_ts-packages_github-avatar_GitHubAvatar_tsx-packages_new--590308")]).then(o.bind(o,68747)).then(e=>({default:e.NewAgentTaskButtonContent})));function h(e){let t,o,d,h,y,x,_=(0,i.c)(24),{isIconButton:b,icon:g,label:N,onOpen:k,onClose:j,setContentOpen:v,open:w,currentRepo:C,currentReference:S,hideRepoSelector:B,eventType:A,size:M,tooltipDirection:R}=e,F=void 0===g?n.AgentIcon:g,T=void 0===N?"New agent task":N,[H,L]=(0,r.useState)(!!w);_[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],_[0]=t):t=_[0];let[I]=(0,u.I)(f,!0,t);_[1]!==k?(o=k??(()=>L(!0)),_[1]=k,_[2]=o):o=_[2];let O=o;_[3]!==j?(d=j??(()=>L(!1)),_[3]=j,_[4]=d):d=_[4];let E=d,P=v??L;return _[5]!==F||_[6]!==b||_[7]!==T||_[8]!==M||_[9]!==R?(h=e=>b?(0,a.jsx)(s.K,{icon:F,"aria-label":T,"aria-labelledby":void 0,size:M,tooltipDirection:R,...e}):(0,a.jsx)(l.Q,{...e,leadingVisual:F,size:M,children:T}),_[5]=F,_[6]=b,_[7]=T,_[8]=M,_[9]=R,_[10]=h):h=_[10],_[11]!==S||_[12]!==C||_[13]!==A||_[14]!==P||_[15]!==B||_[16]!==I?(y=!I&&(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(p,{}),children:(0,a.jsx)(m,{currentRepo:C,currentReference:S,hideRepoSelector:B,setOpen:P,eventType:A})}),_[11]=S,_[12]=C,_[13]=A,_[14]=P,_[15]=B,_[16]=I,_[17]=y):y=_[17],_[18]!==E||_[19]!==O||_[20]!==H||_[21]!==h||_[22]!==y?(x=(0,a.jsx)(c.T,{width:"large",align:"end",open:H,onOpen:O,onClose:E,renderAnchor:h,children:y}),_[18]=E,_[19]=O,_[20]=H,_[21]=h,_[22]=y,_[23]=x):x=_[23],x}function f(){return!1}function p(){let e,t=(0,i.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("div",{className:"d-flex flex-column flex-items-center p-6",children:(0,a.jsx)(d.A,{srText:"Loading..."})}),t[0]=e):e=t[0],e}try{m.displayName||(m.displayName="LazyNewAgentTaskButtonContent")}catch{}try{h.displayName||(h.displayName="NewAgentTaskButton")}catch{}try{p.displayName||(p.displayName="FallbackContent")}catch{}},64375:(e,t,o)=>{o.d(t,{$:()=>n,P:()=>s});var a=o(74848),i=o(96540);let r=i.createContext(!0);function n({allShortcutsEnabled:e,children:t}){return(0,a.jsxs)(r.Provider,{value:e,children:[" ",t," "]})}function s(){return i.useContext(r)}try{r.displayName||(r.displayName="AllShortcutsEnabledContext")}catch{}try{n.displayName||(n.displayName="AllShortcutsEnabledProvider")}catch{}},67941:(e,t,o)=>{o.d(t,{A:()=>m});var a=o(74848),i=o(73017),r=o(38621),n=o(26108),s=o(99511),l=o(61864),c=o(96540),d=o(59775);let u={Box:"TableOfContentsPanel-module__Box--ehst0",NavList:"TableOfContentsPanel-module__NavList--LnyCZ"};function m({onClose:e,toc:t}){let[o,m]=(0,c.useState)(""),[h,f]=(0,c.useState)(""),p=(0,c.useRef)(null);return((0,c.useEffect)(()=>{p.current?.focus()},[]),(0,c.useEffect)(()=>{let e=()=>{window.location.hash&&f(window.location.hash)};return e(),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}},[]),t)?(0,a.jsxs)("section",{"aria-labelledby":"outline-id",className:u.Box,children:[e?(0,a.jsxs)("div",{className:"d-flex flex-justify-between flex-items-center",children:[(0,a.jsx)("h3",{id:"outline-id",ref:p,className:"d-flex flex-justify-between flex-items-center f5 text-bold px-2",tabIndex:-1,children:"Outline"}),(0,a.jsx)(n.K,{"aria-label":"Close outline",tooltipDirection:"sw",className:"fgColor-muted",icon:r.XIcon,onClick:e,variant:"invisible"})]}):null,t.length>=8?(0,a.jsx)("div",{className:"pt-3 px-2",children:(0,a.jsx)(s.A,{leadingVisual:r.FilterIcon,placeholder:"Filter headings","aria-label":"Filter headings",className:"width-full",onChange:e=>{m(e.target.value)}})}):null,(0,a.jsx)(l.c,{className:u.NavList,children:t.map(({level:e,htmlText:t,anchor:r},n)=>{let s;if(!t||o&&!t.toLowerCase().includes(o.toLowerCase()))return null;s=1===e?{fontWeight:"bold"}:{paddingLeft:`${(e-1)*16}px`};let c=`#${r}`;return(0,a.jsx)(l.c.Item,{"aria-current":h===c?"page":void 0,href:c,onClick:e=>{1===e.button||e.metaKey||e.ctrlKey||(h!==c&&(location.href=c),(0,d.e)(c),e.preventDefault())},children:(0,a.jsx)(i.vb,{sx:{...s},html:t})},`outline-${r}-${n}`)})})]}):null}try{m.displayName||(m.displayName="TableOfContentsPanel")}catch{}},71467:(e,t,o)=>{o.d(t,{A:()=>h});var a=o(74848),i=o(96379),r=o(38621),n=o(72511),s=o(73077),l=o(26108),c=o(96540),d=o(9281);let u={Flash:"PublishBanners-module__Flash--_jVGg"};var m=o(34164);function h({showPublishActionBanner:e,releasePath:t,dismissActionNoticePath:o,className:h}){let[f,p]=(0,c.useState)(!1);return e?(0,a.jsxs)(n.A,{hidden:f,className:(0,m.$)(h,u.Flash),children:[e&&(0,a.jsx)("div",{className:"flex-1",children:"You can publish this Action to the GitHub Marketplace"}),(0,a.jsx)(s.z,{href:t,className:(0,m.$)(d.A["code-view-link-button"],"f6 mr-2"),children:"Draft a release"}),(0,a.jsx)(l.K,{icon:r.XIcon,tooltipDirection:"s","aria-label":"Dismiss",className:"bgColor-transparent border-0 pr-0",onClick:e?()=>{(0,i.DI)(o,{method:"POST"}),p(!0)}:()=>{}})]}):null}try{h.displayName||(h.displayName="PublishBanners")}catch{}},73017:(e,t,o)=>{o.d(t,{$6:()=>c,JR:()=>s,vb:()=>n});var a=o(74848),i=o(87448),r=o(96540);let n=d(i.az),s=d(i.EY),l=(0,r.forwardRef)((e,t)=>(0,a.jsx)("div",{ref:t,...e}));l.displayName="Div";let c=d(l);function d(e){let t=(0,r.forwardRef)((t,o)=>{let{html:i,...r}=t;return(0,a.jsx)(e,{ref:o,...r,dangerouslySetInnerHTML:i?{__html:i}:void 0})});return t.displayName=`SafeHTML${e.displayName||e.name}`,t}try{n.displayName||(n.displayName="VerifiedHTMLBox")}catch{}try{s.displayName||(s.displayName="VerifiedHTMLText")}catch{}try{c.displayName||(c.displayName="VerifiedHTMLDiv")}catch{}},74459:(e,t,o)=>{o.d(t,{I6:()=>u,IL:()=>m,QU:()=>h});var a=o(74848),i=o(53552),r=o(78314),n=o(91547),s=o(38621),l=o(72511),c=o(10095);let d={SpoofedCommitWarningBanner:"SpoofedCommitWarning-module__SpoofedCommitWarningBanner--MpTe3"};function u(){return h()?(0,a.jsx)(m,{className:d.SpoofedCommitWarningBanner}):null}function m({className:e}){return(0,a.jsxs)(l.A,{variant:"warning",className:e,"data-testid":"spoofed-commit-warning-banner",children:[(0,a.jsx)(c.A,{icon:s.AlertIcon}),(0,a.jsx)("span",{children:"This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository."})]})}function h(){let e=(0,r.t)(),{refInfo:t,path:o}=(0,i.eu)(),[a]=(0,n.E)(e.ownerLogin,e.name,t.name,o);return a?.isSpoofed??!1}try{u.displayName||(u.displayName="SpoofedCommitWarning")}catch{}try{m.displayName||(m.displayName="SpoofedCommitWarningBanner")}catch{}},77430:(e,t,o)=>{o.d(t,{r:()=>s});var a=o(74848),i=o(71315),r=o(87448),n=o(96540);let s=(0,n.forwardRef)(function({src:e,size:t=20,sx:o,...s},l){let c=(0,n.useMemo)(()=>{let o=new URL(e,i.fV.origin);return o.searchParams.has("size")||o.searchParams.has("s")||o.searchParams.set("size",String(2*Number(t))),o.toString()},[e,t]);return(0,a.jsx)(r.eu,{ref:l,src:c,size:t,"data-testid":"github-avatar",sx:o,...s})});try{s.displayName||(s.displayName="GitHubAvatar")}catch{}},79059:(e,t,o)=>{o.d(t,{t:()=>z});var a=o(74848),i=o(10677),r=o(53552),n=o(78314),s=o(25407),l=o(41462),c=o(94195),d=o(96459),u=o(38621),m=o(69497),h=o(72511),f=o(57352),p=o(10095),y=o(96540),x=o(19357),_=o(26619),b=o(96379),g=o(19189),N=o(6426);function k({uploadUrl:e}){return(0,a.jsx)("document-dropzone",{children:(0,a.jsx)("div",{className:"repo-file-upload-tree-target js-upload-manifest-tree-view","data-testid":"dragzone","data-drop-url":e,"data-target":"document-dropzone.dropContainer",children:(0,a.jsx)("div",{className:"repo-file-upload-outline",children:(0,a.jsxs)("div",{className:"repo-file-upload-slate",children:[(0,a.jsx)("div",{className:"fgColor-muted",children:(0,a.jsx)(u.FileIcon,{size:32})}),(0,a.jsx)("h2",{"aria-hidden":"true",children:"Drop to upload your files"})]})})})})}try{k.displayName||(k.displayName="Dropzone")}catch{}var j=o(66108),v=o(49799),w=o(73017),C=o(62935);let S={directory:"Directory",submodule:"Submodule",symlink_directory:"Symlink to directory",symlink_file:"Symlink to file"};function B({item:e}){switch(e.contentType){case"directory":return(0,a.jsx)(u.FileDirectoryFillIcon,{className:"icon-directory"});case"submodule":case"symlink_directory":return(0,a.jsx)(u.FileSubmoduleIcon,{className:"icon-directory"});case"symlink_file":return(0,a.jsx)(u.FileSymlinkFileIcon,{className:"icon-directory"});default:return(0,a.jsx)(u.FileIcon,{className:"color-fg-muted"})}}function A({initialFocus:e,item:t,getItemUrl:o,onNavigate:i}){let r=o(t),n=t.hasSimplifiedPath?"This path skips through empty directories":t.name;return"submodule"===t.contentType&&(r=t.submoduleUrl??r,i=e=>{e.preventDefault(),t.submoduleUrl&&(window.location.href=t.submoduleUrl)}),(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)("div",{className:"react-directory-filename-cell",children:(0,a.jsx)("div",{className:"react-directory-truncate",children:(0,a.jsx)(j.N,{title:n,"aria-label":`${t.name}, ${function({contentType:e}){return`(${S[e]||"File"})`}(t)}`,className:"symlink_directory"!==t.contentType&&"symlink_file"!==t.contentType?"Link--primary":void 0,"data-react-autofocus":!!e||null,onClick:i,to:r,children:(0,a.jsx)(M,{item:t})})})})})}function M({item:e}){return e.hasSimplifiedPath?(0,a.jsx)(a.Fragment,{children:e.name.split("/").map((e,t,o)=>{let i=t===o.length-1;return(0,a.jsx)("span",{className:i?"":"react-directory-default-color","data-testid":"path-name-segment",children:`${e}${i?"":"/"}`},t)})}):e.submoduleDisplayName?(0,a.jsx)("span",{style:{color:"var(--fgColor-accent, var(--color-accent-fg))"},children:e.submoduleDisplayName}):(0,a.jsx)(a.Fragment,{children:e.name})}function R({commit:e}){return e?e.shortMessageHtmlLink?(0,a.jsx)("div",{children:(0,a.jsx)(w.$6,{className:"react-directory-commit-message",html:e.shortMessageHtmlLink})}):(0,a.jsx)(f.A,{className:"Link--secondary",href:e.url,children:"No commit message"}):(0,a.jsx)(v.r,{})}function F({commit:e}){return e?.date?(0,a.jsx)("div",{className:"react-directory-commit-age",children:Number.isNaN(Date.parse(e.date))?"Invalid date":(0,a.jsx)(C.A,{datetime:e.date,tense:"past"})}):(0,a.jsx)(v.r,{})}try{B.displayName||(B.displayName="IconCell")}catch{}try{A.displayName||(A.displayName="NameCell")}catch{}try{M.displayName||(M.displayName="ItemPathName")}catch{}try{R.displayName||(R.displayName="CommitMessageCell")}catch{}try{F.displayName||(F.displayName="CommitAgeCell")}catch{}let T={Box:"Table-module__Box--KyMHK",Box_1:"Table-module__Box_1--DkRqs",Box_2:"Table-module__Box_2--l1wjV",Box_3:"Table-module__Box_3--CeioY",Box_4:"Table-module__Box_4--xPnSl"};var H=o(34164);function L({children:e,className:t,...o}){return(0,a.jsx)("table",{className:(0,H.$)(T.Box,t),...o,children:e})}let I=({children:e,className:t})=>(0,a.jsx)("thead",{className:(0,H.$)(t,T.Box_1),children:(0,a.jsx)("tr",{className:T.Box_2,children:e})}),O=({children:e,onClick:t,index:o,id:i})=>(0,a.jsx)("tr",{onClick:t,"data-index":o,id:i,className:T.Box_3,children:e}),E=({children:e})=>(0,a.jsx)("tfoot",{className:T.Box_4,children:e});try{L.displayName||(L.displayName="Table")}catch{}try{I.displayName||(I.displayName="HeaderRow")}catch{}try{O.displayName||(O.displayName="Row")}catch{}try{E.displayName||(E.displayName="TableFooter")}catch{}let P={PrimerLink:"DirectoryRow-module__PrimerLink--MeWOM",Box:"DirectoryRow-module__Box--uM44V",Octicon:"DirectoryRow-module__Octicon--_lwmM"},D=({className:e,onClickHandler:t,index:o,item:i,initialFocus:r,getItemUrl:n,onNavigate:s,commit:l})=>(0,a.jsxs)("tr",{className:`react-directory-row ${e}`,onClick:t,id:`folder-row-${o}`,children:[(0,a.jsx)("td",{className:"react-directory-row-name-cell-small-screen",colSpan:2,children:(0,a.jsxs)("div",{className:"react-directory-filename-column",children:[(0,a.jsx)(B,{item:i}),(0,a.jsx)(A,{initialFocus:r,item:i,getItemUrl:n,onNavigate:s})]})}),(0,a.jsx)("td",{className:"react-directory-row-name-cell-large-screen",colSpan:1,children:(0,a.jsxs)("div",{className:"react-directory-filename-column",children:[(0,a.jsx)(B,{item:i}),(0,a.jsx)(A,{initialFocus:r,item:i,getItemUrl:n,onNavigate:s})]})}),(0,a.jsx)("td",{className:"react-directory-row-commit-cell",children:(0,a.jsx)(R,{commit:l})}),(0,a.jsx)("td",{children:(0,a.jsx)(F,{commit:l})})]});function W({initialFocus:e,item:t,commit:o,onNavigate:i,getItemUrl:r,navigate:n,index:s,className:l}){let d=y.useCallback(e=>{window.innerWidth{window.innerWidth{n(s)},ref:o,rel:"nofollow",to:t,className:P.PrimerLink,children:(0,a.jsxs)("div",{className:(0,H.$)("width-full",P.Box),children:[(0,a.jsx)(p.A,{icon:u.FileDirectoryFillIcon,size:"small",className:P.Octicon}),".."]})})]})})}try{D.displayName||(D.displayName="RowContent")}catch{}try{W.displayName||(W.displayName="WrappedDirectoryRow")}catch{}try{q.displayName||(q.displayName="DirectoryRow")}catch{}try{U.displayName||(U.displayName="GoDirectoryUpRow")}catch{}let $={Box:"DirectoryContent-module__Box--y3Nvf",Box_1:"DirectoryContent-module__Box_1--xeAhp",Box_2:"DirectoryContent-module__Box_2--h912w",Box_3:"DirectoryContent-module__Box_3--zI0N1",Box_4:"DirectoryContent-module__Box_4--QyUbd",Box_5:"DirectoryContent-module__Box_5--OJZQU",OverviewHeaderRow:"DirectoryContent-module__OverviewHeaderRow--FlrUZ"};function z({overview:e}){let t=(0,n.t)(),{refInfo:o,path:j}=(0,r.eu)(),{items:v,templateDirectorySuggestionUrl:w,totalCount:C}=(0,i.d)(),{items:S}=function(e,t){let o=e.length>100,[a,i]=(0,y.useState)(o);!function(e,t){let o=(0,y.useCallback)(e,t);(0,y.useEffect)(()=>{let e=null,t=null;return t=requestAnimationFrame(()=>{e=setTimeout(()=>{o(),e=null},0),t=null}),()=>{e&&clearTimeout(e),t&&cancelAnimationFrame(t)}},[o])}(()=>{a&&i(!1)},[a]);let r=a?e.slice(0,100):e;return{truncated:a,items:r}}(v,100),[B,A]=y.useState(!!e),M=C-v.length,{commitInfo:R}=function(){let{refInfo:e,path:t}=(0,r.eu)(),o=(0,n.t)(),[a,i]=(0,y.useState)({loading:!0}),l=(0,_.Xl)(),c=(0,s.IO9)({repo:o,action:"tree-commit-info",commitish:e.name,path:t});return(0,y.useEffect)(()=>{let e=!1;return(async()=>{i({loading:!0});let t=await (0,b.lS)(c);if(!e)try{t.ok?i({commitInfo:await t.json()}):(l({variant:"warning",message:"Failed to load latest commit information."}),i({error:!0}))}catch{i({error:!0})}})(),function(){e=!0}},[l,c]),a}(),F=j.length>1,T=(0,s.ylB)(j),P=(0,s.IO9)({repo:t,action:"tree",commitish:o.name,path:T}),D=(0,s.IO9)({repo:t,commitish:o.name,path:j,action:"upload"}),W=y.useRef(null),{getItemUrl:z}=(0,g.Z)(),V=(0,d.Z)(),{focusHint:K}=(0,x.e)(),[G,Q]=y.useState(-1),Y=y.useCallback(e=>{0===e.screenX&&0===e.screenY&&W.current?.focus()},[]),X=y.useCallback(()=>{A(!1)},[]),J=y.useCallback(e=>{let t;Q(e);let o=document.getElementById(`folder-row-${e}`);(t=window.innerWidth<=c.Gy.medium?o?.querySelector(".react-directory-row-name-cell-small-screen"):o?.querySelector(".react-directory-row-name-cell-large-screen"))||(t=o),t?.getElementsByTagName("a")[0]?.focus()},[]);return(0,a.jsxs)("div",{"data-hpc":!0,children:[(0,a.jsx)("button",{hidden:!0,"data-testid":"focus-next-element-button","data-hotkey":"j",onClick:()=>{J(Math.min(G+1,F?S.length:S.length-1))}}),(0,a.jsx)("button",{hidden:!0,"data-testid":"focus-previous-element-button","data-hotkey":"k",onClick:()=>{J(Math.max(G-1,0))}}),(0,a.jsx)(l.W,{as:"h2",text:"Folders and files",id:"folders-and-files"}),(0,a.jsxs)(L,{"aria-labelledby":"folders-and-files",children:[(0,a.jsxs)(I,{className:(0,H.$)(e&&$.OverviewHeaderRow),children:[(0,a.jsx)("th",{colSpan:2,className:$.Box,children:(0,a.jsx)("span",{className:"text-bold",children:"Name"})}),(0,a.jsx)("th",{colSpan:1,className:$.Box_1,children:(0,a.jsx)("span",{className:"text-bold",children:"Name"})}),(0,a.jsx)("th",{className:"hide-sm",children:(0,a.jsx)(m.A,{inline:!0,title:"Last commit message",className:"width-fit",children:(0,a.jsx)("span",{className:"text-bold",children:"Last commit message"})})}),(0,a.jsx)("th",{colSpan:1,className:$.Box_2,children:(0,a.jsx)(m.A,{inline:!0,title:"Last commit date",className:"width-fit",children:(0,a.jsx)("span",{className:"text-bold",children:"Last commit date"})})})]}),(0,a.jsxs)("tbody",{children:[!!e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("tr",{className:$.Box_3,children:(0,a.jsx)("td",{colSpan:3,className:"bgColor-muted p-1 rounded-top-2",children:(0,a.jsx)(N.S,{commitCount:e?.commitCount})})}),M>0?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:3,children:(0,a.jsxs)(h.A,{variant:"warning",className:"rounded-0",children:[(0,a.jsx)(p.A,{icon:u.AlertIcon}),"Sorry, we had to truncate this directory to 1,000 files. ",M," entries were omitted from the list."]})})}):null]}),F&&(0,a.jsx)(U,{initialFocus:!K||!S.some(e=>e.path===K),linkTo:P,linkRef:W,navigate:V}),S.map((e,t)=>(0,a.jsx)(q,{initialFocus:e.path===K,item:e,commit:(R||{})[e.name],onNavigate:Y,getItemUrl:z,navigate:V,className:B&&t>=10?"truncate-for-mobile":void 0,index:F?t+1:t},e.name)),(0,a.jsx)("tr",{className:(0,H.$)(B&&S.length>10?"show-for-mobile":"d-none",$.Box_4),"data-testid":"view-all-files-row",children:(0,a.jsx)("td",{colSpan:3,onClick:X,className:$.Box_5,children:(0,a.jsx)("div",{children:(0,a.jsx)(f.A,{as:"button",onClick:X,children:"View all files"})})})})]}),w&&(0,a.jsx)(E,{children:(0,a.jsx)(O,{children:(0,a.jsxs)("td",{colSpan:3,children:["Customize the issue creation experience with a ",(0,a.jsx)("code",{children:"config.yml"})," file."," ",(0,a.jsx)(f.A,{inline:!0,href:w,children:"Learn more about configuring a template chooser."})]})})})]}),t.currentUserCanPush&&(0,a.jsx)(k,{uploadUrl:D})]})}try{z.displayName||(z.displayName="DirectoryContent")}catch{}},79739:(e,t,o)=>{o.d(t,{D:()=>p});var a=o(74848),i=o(53552),r=o(78314),n=o(25407),s=o(38621),l=o(73077),c=o(72579),d=o(57352),u=o(10095),m=o(9281),h=o(34164);let f={Box:"CodeViewError-module__Box--ThnZK"};function p(e){let t=(0,r.t)(),{refInfo:o,path:c}=(0,i.eu)();return(0,a.jsx)("div",{className:f.Box,children:(0,a.jsxs)("div",{className:"d-flex flex-column flex-justify-center flex-items-center border rounded-2 px-6 py-7",children:[(0,a.jsx)(u.A,{icon:s.AlertIcon,className:"fgColor-muted mb-2",size:20}),(0,a.jsx)(y,{...e}),(c||!o.currentOid)&&(0,a.jsx)(l.z,{type:"button",className:(0,h.$)("mt-4",m.A["code-view-link-button"]),variant:"primary","aria-label":o.currentOid?"go to Overview":"go to default branch",href:o.currentOid?(0,n.Do2)(t):(0,n.xlN)(t),children:o.currentOid?"Return to the repository overview":"Go to default branch"})]})})}function y({httpStatus:e,type:t}){return(0,a.jsxs)("div",{className:"d-flex flex-column flex-items-center gap-1 text-center",children:[(0,a.jsx)("div",{className:"f2 fgColor-default text-bold",children:404===e?"404 - page not found":"Error loading page"}),404===e?(0,a.jsx)(x,{}):(0,a.jsx)(_,{httpStatus:e,type:t})]})}function x(){let e=(0,r.t)(),{path:t,refInfo:o}=(0,i.eu)();return o.currentOid?(0,a.jsxs)("div",{className:"d-flex flex-wrap flex-justify-center fgColor-muted","data-testid":"eror-404-description",children:["The\xa0",(0,a.jsx)(c.A,{as:"p",className:"mb-0",children:o.name}),"\xa0branch of\xa0",(0,a.jsx)("p",{className:"text-bold mb-0",children:e.name}),"\xa0does not contain the path\xa0",(0,a.jsxs)("p",{className:"text-bold mb-0",children:[t,"."]})]}):(0,a.jsxs)("div",{className:"d-flex flex-wrap flex-justify-center fgColor-muted","data-testid":"error-404-description",children:["Cannot find a valid ref in\xa0",(0,a.jsx)(c.A,{as:"p",className:"mb-0",children:o.name})]})}function _({httpStatus:e,type:t}){let o=e?` ${e} error`:"error";return"fetchError"===t?(0,a.jsx)("div",{className:"f5 fgColor-muted","data-testid":"fetch-error-description",children:"It looks like your internet connection is down. Please check it."}):(0,a.jsxs)("div",{className:"f5 fgColor-muted","data-testid":"default-error-description",children:["An unexpected ",o," occured. Try",(0,a.jsx)(d.A,{inline:!0,onClick:()=>window.location.reload(),children:"\xa0reloading the page."},"reload-page")]})}try{p.displayName||(p.displayName="CodeViewError")}catch{}try{y.displayName||(y.displayName="ErrorText")}catch{}try{x.displayName||(x.displayName="DescriptionText404")}catch{}try{_.displayName||(_.displayName="DefaultDescriptionText")}catch{}},80780:(e,t,o)=>{o.d(t,{V3:()=>c,_y:()=>l,wk:()=>s});var a=o(54571),i=o(39111);let r={cursorNavigationHopWordLeft:{hotkey:"Alt+ArrowLeft,Ctrl+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationHopWordRight:{hotkey:"Alt+ArrowRight,Ctrl+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationTopOfPage:{hotkey:"Meta+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationBottomOfPage:{hotkey:"Meta+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationEnd:{hotkey:"End,Meta+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"]},cursorNavigationHome:{hotkey:"Home,Meta+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"]},cursorNavigationPageUp:{hotkey:"PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"]},cursorNavigationPageDown:{hotkey:"PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"]},cursorNavigationArrowDown:{hotkey:"ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"]},cursorNavigationArrowUp:{hotkey:"ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"]},cursorNavigationArrowLeft:{hotkey:"ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"]},cursorNavigationArrowRight:{hotkey:"ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"]},cursorNavigationShiftHopWordLeft:{hotkey:"Alt+Shift+ArrowLeft,Ctrl+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftHopWordRight:{hotkey:"Alt+Shift+ArrowRight,Ctrl+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationShiftTopOfPage:{hotkey:"Meta+Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftBottomOfPage:{hotkey:"Meta+Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftEnd:{hotkey:"Shift+End,Meta+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"],modifierRequired:!0},cursorNavigationShiftHome:{hotkey:"Shift+Home,Meta+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"],modifierRequired:!0},cursorNavigationShiftPageUp:{hotkey:"Shift+PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"],modifierRequired:!0},cursorNavigationShiftPageDown:{hotkey:"Shift+PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"],modifierRequired:!0},cursorNavigationShiftArrowDown:{hotkey:"Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftArrowUp:{hotkey:"Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftArrowLeft:{hotkey:"Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftArrowRight:{hotkey:"Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationHighlightLine:{text:"J",hotkey:"Shift+J",useWhileBlobFocused:!0,noModifierHotkey:["J"],modifierRequired:!0},cursorNavigationGoLineUp:{hotkey:"Ctrl+p",useWhileBlobFocused:!0,noModifierHotkey:["p"],modifierRequired:!0},cursorNavigationOpenHelpDialog:{hotkey:"Alt+F1,Control+Alt+\u02D9,Control+Alt+h",useWhileBlobFocused:!0,noModifierHotkey:["F1","h","\u02D9"],modifierRequired:!0},cursorNavigationGoLineDown:{hotkey:"Ctrl+n",useWhileBlobFocused:!0,noModifierHotkey:["n"],modifierRequired:!0},cursorNavigationEnter:{text:"\u2318 Enter",hotkey:"Meta+Enter",useWhileBlobFocused:!0,noModifierHotkey:["Enter"],modifierRequired:!0},cursorNavigationSpace:{hotkey:" ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!1},cursorNavigationShiftSpace:{hotkey:"Shift+ ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!0},expandAndFocusLineContextMenu:{text:"Shift Alt C",hotkey:"Alt+Shift+C,Alt+Shift+\xc7",useWhileBlobFocused:!0,noModifierHotkey:["C"],modifierRequired:!0},copyFilePathShortcut:{text:"\u2318 shift .",hotkey:"Meta+Shift+>",useWhileBlobFocused:!0,noModifierHotkey:["."],modifierRequired:!0},copyPermalinkShortcut:{text:"\u2318 shift ,",hotkey:"Meta+Shift+<",useWhileBlobFocused:!0,noModifierHotkey:[","],modifierRequired:!0},copyRawContentShortcut:{text:"\u2318 shift c",hotkey:"Meta+Shift+C",useWhileBlobFocused:!0,noModifierHotkey:["c"],modifierRequired:!0},downloadRawContentShortcut:{text:"\u2318 shift s",hotkey:"Meta+Shift+S",useWhileBlobFocused:!0,noModifierHotkey:["s"],modifierRequired:!0},editFileShortcut:{hotkey:"e,Shift+E",useWhileBlobFocused:!0,noModifierHotkey:["e","E"]},goToLineShortcut:{text:"l",hotkey:"l,Shift+L",ariaKeyShortcuts:"l",useWhileBlobFocused:!0,noModifierHotkey:["l","L"]},alternativeGoToLineShortcut:{hotkey:"Mod+Alt+g",ariaKeyShortcuts:"Mod+Alt+g",useWhileBlobFocused:!0,noModifierHotkey:["g","G"]},findInFileShortcut:{hotkey:"Meta+f, F3",text:"\u2318 f",ariaKeyShortcuts:"Meta+F",useWhileBlobFocused:!0,noModifierHotkey:["f","F3"],modifierRequired:!0},findFilesShortcut:{hotkey:"t,Shift+T",useWhileBlobFocused:!0,noModifierHotkey:["t","T"]},findSelectionShortcut:{hotkey:"Meta+e",useWhileBlobFocused:!0,noModifierHotkey:["e"],modifierRequired:!0},findNextShortcut:{hotkey:"Mod+g"},findPrevShortcut:{hotkey:"Mod+Shift+G"},openWithGitHubDevShortcut:{hotkey:"., Meta+Shift+/",useWhileBlobFocused:!0,noModifierHotkey:["."]},openWithGitHubDevInNewWindowShortcut:{hotkey:"Shift+.,Shift+>,>",useWhileBlobFocused:!0,noModifierHotkey:[">"]},permalinkShortcut:{hotkey:"y,Shift+Y",useWhileBlobFocused:!0,noModifierHotkey:["y","Y"]},searchShortcut:{hotkey:"/",useWhileBlobFocused:!0,noModifierHotkey:["/"]},selectAllShortcut:{hotkey:"Meta+a",useWhileBlobFocused:!0,noModifierHotkey:["a"],modifierRequired:!0},selectEditTabShortcut:{hotkey:"Mod+Shift+P"},submitCommitDialogShortcut:{hotkey:"Mod+Enter"},refSelectorShortcut:{hotkey:"w",text:"w",useWhileBlobFocused:!0,noModifierHotkey:["w"]},escapeRightClickMenu:{hotkey:"Escape",useWhileBlobFocused:!0,noModifierHotkey:["Escape"]},toggleFocusedPaneShortcut:{hotkey:"Meta+F6,Meta+Shift+F6",useWhileBlobFocused:!0,noModifierHotkey:["F6"],modifierRequired:!0},toggleSymbolsShortcut:{hotkey:"Meta+i",useWhileBlobFocused:!0,noModifierHotkey:["i"],modifierRequired:!0},toggleTreeShortcut:{hotkey:"Meta+b",useWhileBlobFocused:!0,noModifierHotkey:["b"],modifierRequired:!0},viewBlameShortcut:{hotkey:"b,Shift+B,Meta+/ Meta+b",useWhileBlobFocused:!0,noModifierHotkey:["b"]},viewCodeShortcut:{hotkey:"Meta+/ Meta+c",useWhileBlobFocused:!0,modifierRequired:!0},viewPreviewShortcut:{hotkey:"Meta+/ Meta+p"},viewRawContentShortcut:{text:"\u2318 / \u2318 r",hotkey:"Meta+/ Meta+r",useWhileBlobFocused:!0,noModifierHotkey:["r"],modifierRequired:!0},findSymbolShortcut:{hotkey:"r,Shift+R",useWhileBlobFocused:!0,noModifierHotkey:["r","R"],modifierRequired:!1}},n=new Map;function s(){let e=(0,i.X)(["mac"]),[t]=(0,a.I)(()=>!1,!0,[]),o=0;if(e?o=1:t||(o=2),!n.has(o)){var s,l;let a=r;e||t||(a=Object.keys(s=a).reduce((e,t)=>{let o=s[t];return e[t]={hotkey:o.hotkey?.replace(/Meta/g,"Control"),text:o.text?.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"),ariaKeyShortcuts:o.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:o.useWhileBlobFocused,modifierRequired:o.modifierRequired,noModifierHotkey:o.noModifierHotkey},e},{})),t&&(a=Object.keys(l=a).reduce((e,t)=>{let o=l[t];return e[t]={hotkey:void 0,text:o.text?.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"),ariaKeyShortcuts:o.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:o.useWhileBlobFocused,modifierRequired:o.modifierRequired,noModifierHotkey:o.noModifierHotkey},e},{})),n.set(o,a)}return n.get(o)}function l(){let e=s();return Object.keys(e).reduce((t,o)=>{let a=e[o];if(a.useWhileBlobFocused&&a.noModifierHotkey&&a.modifierRequired)for(let e of a.noModifierHotkey)t.includes(e)||t.push(e);return t},[])}function c(){let e=s();return Object.keys(e).reduce((t,o)=>{let a=e[o];if(a.useWhileBlobFocused&&a.noModifierHotkey&&!a.modifierRequired)for(let e of a.noModifierHotkey)t.includes(e)||t.push(e);return t},[])}},83025:(e,t,o)=>{o.d(t,{l:()=>l});var a=o(74848),i=o(96459),r=o(38621),n=o(87448),s=o(80780);function l({editPath:e,editTooltip:t,customSx:o}){let{editFileShortcut:l}=(0,s.wk)(),c=(0,i.Z)();return e?(0,a.jsx)(n.K0,{icon:r.PencilIcon,sx:{...o},"aria-label":t,onClick:()=>{c(e)},"data-hotkey":l.hotkey,size:"small",title:t,variant:"invisible"}):null}try{l.displayName||(l.displayName="EditButton")}catch{}},91547:(e,t,o)=>{o.d(t,{E:()=>m,q:()=>u});var a=o(5225),i=o(25407),r=o(82591),n=o(96379),s=o(96540);async function l(e){let t=await (0,n.lS)(e);return t.ok?await t.json():void 0}let c=new Map,d=(0,a.A)(l,{cache:c});function u(){c.clear()}function m(e,t,o,a){let[n,l]=(0,s.useState)(),[c,m]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!0),p=t&&e&&o&&a?(0,i.IO9)({repo:{name:t,ownerLogin:e},commitish:o,action:"latest-commit",path:a}):null;return(0,s.useEffect)(()=>{let e=new AbortController;return document.addEventListener(r.z.START,u,{signal:e.signal}),()=>{e.abort()}},[]),(0,s.useEffect)(()=>{let e=!1;return(async()=>{if(!p)return;m(!1),f(!0),l(void 0);let t=await d(p);if(!e){try{t?l(t):m(!0)}catch{m(!0)}f(!1)}})(),function(){e=!0}},[p,o]),[n,h,c]}},93753:(e,t,o)=>{o.d(t,{R:()=>m});var a=o(74848),i=o(78314),r=o(25407),n=o(66990),s=o(43258),l=o(96540),c=o(53552),d=o(80780),u=o(6665);function m({size:e,buttonClassName:t,allowResizing:o,idEnding:m}){let h=(0,i.t)(),{refInfo:f,path:p,action:y}=(0,c.eu)(),x=function(){let{addToast:e}=(0,s.Y6)();return(0,l.useCallback)(t=>e({type:"error",message:t}),[e])}(),{sendRepoClickEvent:_}=(0,u.T)(),{refSelectorShortcut:b}=(0,d.wk)();return(0,a.jsx)(n.PI,{currentCommitish:f.name,defaultBranch:h.defaultBranch,owner:h.ownerLogin,repo:h.name,canCreate:h.currentUserCanPush,cacheKey:f.listCacheKey,selectedRefType:f.refType,getHref:e=>`${(0,r.IO9)({repo:h,commitish:e,action:y,path:p})}${window.location.search}`,hotKey:b.hotkey,onBeforeCreate:e=>_("REF_SELECTOR_MENU.CREATE_BRANCH",{ref_name:e}),onCreateError:x,onOpenChange:e=>e&&_("REF_SELECTOR_MENU"),size:e,buttonClassName:t,allowResizing:o,idEnding:m||"repos-header-ref-selector",useFocusZone:!0})}try{m.displayName||(m.displayName="ReposHeaderRefSelector")}catch{}}}]); //# sourceMappingURL=packages_code-view-shared_hooks_use-canonical-object_ts-packages_code-view-shared_hooks_use-f-11e2e7-8d3d380d993c.js.map